<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>3 css函数：var</title>
  <style>
    :root {
      --primary-color: orange;
      --second-color: purple;
      --bg-color: #eee;
      --container-width: 1200px;
      --container-height: 80px;
      --primary-size: 18px;
    }

    .box {
      width: var(--main-width);
      height: var(--main-height);
      color: var(--primary-color);
      background: var(--bg-color);
    }
  </style>
</head>

<body>
  <div class="box">Lorem ipsum dolor sit amet consectetur adipisicing elit. Debitis a dicta sunt inventore deleniti
    earum quisquam tempora quis provident, autem hic nisi natus expedita sint nam repellat, libero dolorem voluptas.
  </div>
</body>

</html>